09. Final Considerations
Supplied Files
We will provide you with the required environment you will need to map and other assorted files. These will not be provided in the same structured order that you saw the Localization project. You will be building, placing, and modifying all the required files from scratch.
Hint: Consider using a similar structure to that of the Localization project.
Note 1: A telop file is included and can be placed in your scripts folder. You may need to give it executable permissions. You will also need to create a launch file for this telop file.
Note 2: Another one of the provided scripts, called rtab_run
, will help you expedite the testing of launch files and the project. You may need to adjust the paths, naming, and other variables accordingly. It is not required to use this file, but it can help save time!
Note 3: Take this chance to understand what role each of the files plays and how they fit into the larger picture.
Download the project files here or if you want to bring them into the Udacity Workspace with the command line use: wget https://s3-us-west-1.amazonaws.com/udacity-robotics/Term+2+Resources/P3+Resources/Student+Project+Materials.zip
.
Mapping Best Practices
Our goal is to create a great map with the least amount of passes as possible. Getting 3 loop closures will be sufficient for mapping the entire environment. You can maximize your loop closures by going over similar paths two or three times. This allows for the maximization of feature detection, facilitating faster loop closures! When you are done mapping, be sure to copy or move your database before moving on to map a new environment. Remember, relaunching the mapping node deletes any database in place on launch start up!
Building Your Own Simulated Environment
Once you have mastered the provided environment, it’s time to build upon your skills and use them for something more relevant to your robotics desires. Perhaps you want to test out some control algorithms for a drone you have built. One might argue that it is better to test in simulation first than to make costly mistakes in the real world.
Let’s cover some basics that will help you create your own environment to map.
- Open Gazebo
- Go to Insert -> Model Database
- Browse through the available models and find several objects that you would like to use-such as walls, tables, and pre-built environments.
- Drag your selected objects into the environment and situate them to your liking (you can change their position, orientation, scale.)
- As you're build your environment, take into consideration that your robot will spawn at coordinates (0,0,0), so place the blue z-axis in Gazebo accordingly.
- When you have everything situated the way you like, export the model: File -> Save World As, then navigate to your custom package, and then the ‘models’ directory, and save the file with a .world extension.
- When you are done, you may test your world by launching it as so,
gazebo your_world.world
This is a relatively simple way to generate a world file. If you are interested in building custom models to generate a hyper-realistic environment there will be links to do so below. This would add a fantastic personal touch to your project, however, using existing models is sufficient for passing the project.